﻿using UnityEngine;
using System.Collections;

public class Vision : MonoBehaviour {

    public AudioSource audioTarget;
    public GUIText subtitle;
	// Use this for initialization
	void Start () 
	{
	
	}
	public bool justFlipped = false;

	public enum VisionType {gravUp, gravDown, shape};
	public VisionType visionType = VisionType.gravUp;
	// Update is called once per frame
	void Update () 
	{
		justFlipped = false;
		if (Input.GetKeyDown (KeyCode.Z)) 
		{
            audioTarget.Play();

			switch(visionType)
			{
			case VisionType.gravDown:
				visionType = VisionType.gravUp;
                subtitle.text = "Gravity -";
				break;
			case VisionType.gravUp:
				visionType = VisionType.shape;
                subtitle.text = "Size Change";
				break;
			case VisionType.shape:
				visionType = VisionType.gravDown;
                subtitle.text = "Gravity +";

				break;
			}
		}
		if (Input.GetKeyDown (KeyCode.Space)) 
		{
			//transform.RotateAround(transform.parent.position, Vector3.up, 180);
			justFlipped = true;
			Debug.Log("Flipped");
		}
		 
	}
}
